home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / include / gtk-1.2 / gtk / gtklist.h < prev    next >
Encoding:
C/C++ Source or Header  |  2005-10-18  |  4.6 KB  |  144 lines

  1. /* GTK - The GIMP Toolkit
  2.  * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
  3.  *
  4.  * This library is free software; you can redistribute it and/or
  5.  * modify it under the terms of the GNU Library General Public
  6.  * License as published by the Free Software Foundation; either
  7.  * version 2 of the License, or (at your option) any later version.
  8.  *
  9.  * This library is distributed in the hope that it will be useful,
  10.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.     See the GNU
  12.  * Library General Public License for more details.
  13.  *
  14.  * You should have received a copy of the GNU Library General Public
  15.  * License along with this library; if not, write to the
  16.  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  17.  * Boston, MA 02111-1307, USA.
  18.  */
  19.  
  20. /*
  21.  * Modified by the GTK+ Team and others 1997-1999.  See the AUTHORS
  22.  * file for a list of people on the GTK+ Team.  See the ChangeLog
  23.  * files for a list of changes.  These files are distributed with
  24.  * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 
  25.  */
  26.  
  27. #ifndef __GTK_LIST_H__
  28. #define __GTK_LIST_H__
  29.  
  30.  
  31. #include <gdk/gdk.h>
  32. #include <gtk/gtkenums.h>
  33. #include <gtk/gtkcontainer.h>
  34. #include <gtk/gtklistitem.h>
  35.  
  36. #ifdef __cplusplus
  37. extern "C" {
  38. #endif /* __cplusplus */
  39.  
  40.  
  41. #define GTK_TYPE_LIST                  (gtk_list_get_type ())
  42. #define GTK_LIST(obj)                  (GTK_CHECK_CAST ((obj), GTK_TYPE_LIST, GtkList))
  43. #define GTK_LIST_CLASS(klass)          (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_LIST, GtkListClass))
  44. #define GTK_IS_LIST(obj)               (GTK_CHECK_TYPE ((obj), GTK_TYPE_LIST))
  45. #define GTK_IS_LIST_CLASS(klass)       (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_LIST))
  46.  
  47.  
  48. typedef struct _GtkList          GtkList;
  49. typedef struct _GtkListClass  GtkListClass;
  50.  
  51. struct _GtkList
  52. {
  53.   GtkContainer container;
  54.  
  55.   GList *children;
  56.   GList *selection;
  57.  
  58.   GList *undo_selection;
  59.   GList *undo_unselection;
  60.  
  61.   GtkWidget *last_focus_child;
  62.   GtkWidget *undo_focus_child;
  63.  
  64.   guint htimer;
  65.   guint vtimer;
  66.  
  67.   gint anchor;
  68.   gint drag_pos;
  69.   GtkStateType anchor_state;
  70.  
  71.   guint selection_mode : 2;
  72.   guint drag_selection:1;
  73.   guint add_mode:1;
  74. };
  75.  
  76. struct _GtkListClass
  77. {
  78.   GtkContainerClass parent_class;
  79.  
  80.   void (* selection_changed) (GtkList    *list);
  81.   void (* select_child)         (GtkList    *list,
  82.                   GtkWidget *child);
  83.   void (* unselect_child)    (GtkList    *list,
  84.                   GtkWidget *child);
  85. };
  86.  
  87.  
  88. GtkType       gtk_list_get_type          (void);
  89. GtkWidget* gtk_list_new              (void);
  90. void       gtk_list_insert_items      (GtkList        *list,
  91.                        GList        *items,
  92.                        gint             position);
  93. void       gtk_list_append_items      (GtkList        *list,
  94.                        GList        *items);
  95. void       gtk_list_prepend_items      (GtkList        *list,
  96.                        GList        *items);
  97. void       gtk_list_remove_items      (GtkList        *list,
  98.                        GList        *items);
  99. void       gtk_list_remove_items_no_unref (GtkList        *list,
  100.                        GList        *items);
  101. void       gtk_list_clear_items          (GtkList        *list,
  102.                        gint             start,
  103.                        gint             end);
  104. void       gtk_list_select_item          (GtkList        *list,
  105.                        gint             item);
  106. void       gtk_list_unselect_item      (GtkList        *list,
  107.                        gint             item);
  108. void       gtk_list_select_child      (GtkList        *list,
  109.                        GtkWidget        *child);
  110. void       gtk_list_unselect_child      (GtkList        *list,
  111.                        GtkWidget        *child);
  112. gint       gtk_list_child_position      (GtkList        *list,
  113.                        GtkWidget        *child);
  114. void       gtk_list_set_selection_mode      (GtkList        *list,
  115.                        GtkSelectionMode  mode);
  116.  
  117. void       gtk_list_extend_selection      (GtkList          *list,
  118.                        GtkScrollType     scroll_type,
  119.                        gfloat            position,
  120.                        gboolean          auto_start_selection);
  121. void       gtk_list_start_selection       (GtkList          *list);
  122. void       gtk_list_end_selection         (GtkList          *list);
  123. void       gtk_list_select_all            (GtkList          *list);
  124. void       gtk_list_unselect_all          (GtkList          *list);
  125. void       gtk_list_scroll_horizontal     (GtkList          *list,
  126.                        GtkScrollType     scroll_type,
  127.                        gfloat            position);
  128. void       gtk_list_scroll_vertical       (GtkList          *list,
  129.                        GtkScrollType     scroll_type,
  130.                        gfloat            position);
  131. void       gtk_list_toggle_add_mode       (GtkList          *list);
  132. void       gtk_list_toggle_focus_row      (GtkList          *list);
  133. void       gtk_list_toggle_row            (GtkList          *list,
  134.                        GtkWidget        *item);
  135. void       gtk_list_undo_selection        (GtkList          *list);
  136. void       gtk_list_end_drag_selection    (GtkList          *list);
  137.  
  138. #ifdef __cplusplus
  139. }
  140. #endif /* __cplusplus */
  141.  
  142.  
  143. #endif /* __GTK_LIST_H__ */
  144.